<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../js/bootstrap/css/bootstrap.min.css">
    <title>激活会员</title>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-sm-12">
            <form class="form-horizontal">

                <div class="form-group">
                    <label class="col-sm-2 control-label">邮箱:</label>
                    <div class="col-sm-4">
                        <input type="text" id="mail" class="form-control"  placeholder="请输入邮箱">
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="button" class="btn btn-success" onclick="sendMail()"><i class="glyphicon glyphicon-ok-sign"></i>发送邮件激活</button>
                    </div>
                </div>

            </form>
        </div>
    </div>
</div>

<script src="../js/jquery-3.3.1.js"></script>
<script src="../js/bootstrap/js/bootstrap.min.js"></script>
<script src="../js/common.js"></script>
<script>
    function sendMail(){
        var v_param ={}
        v_param.mail = $("#mail").val();
        $.ajax({
            type:"post",
            url:API_URL+"member/memberActiva",
            data:v_param,
            success:function (res){
                if (res.code == 200){
                    location.href = "regSuccess.html";
                }else {
                    alert(res.msg);
                }
            }
        })
    }
</script>
</body>
</html>